﻿<%@ Page Language="C#" Culture="en-US" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <script type="text/javascript">
            //Put your JavaScript code here.
        </script>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
        <div>
            <telerik:RadGrid ID="RadGrid1" runat="server"
                AllowPaging="True"
                AllowSorting="True"
                AllowCustomPaging="True"
                OnNeedDataSource="RadGrid1_NeedDataSource"
                AllowAutomaticDeletes="False"
                AllowAutomaticInserts="False"
                AllowAutomaticUpdates="False"
                GroupPanelPosition="Top"
                GroupingEnabled="False"
                EnableHeaderContextMenu="True"
                AutoGenerateDeleteColumn="False"
                AutoGenerateEditColumn="False"
                GridLines="None"
                ItemType="Simple.RadGridPaging.Models.Order">
                <HeaderContextMenu EnableTheming="True">
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                </HeaderContextMenu>
                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                <GroupingSettings CaseSensitive="False" />
                <FilterMenu EnableTheming="False">
                    <CollapseAnimation Type="OutSine" Duration="200"></CollapseAnimation>
                </FilterMenu>
                <ExportSettings ExportOnlyData="True" OpenInNewWindow="True">
                    <Excel Format="ExcelML"></Excel>
                </ExportSettings>
                <ClientSettings EnableRowHoverStyle="true">
                    <Selecting AllowRowSelect="True"></Selecting>
                </ClientSettings>

                <MasterTableView
                    CommandItemDisplay="TopAndBottom"
                    AllowSorting="True"
                    EditMode="PopUp"
                    AllowFilteringByColumn="True"
                    DataKeyNames="OrderID"
                    ItemType="Simple.RadGridPaging.Models.Order"
                    AutoGenerateColumns="False">
                    <CommandItemSettings ShowExportToExcelButton="True" AddNewRecordText="新增" ShowAddNewRecordButton="true"></CommandItemSettings>
                    <EditFormSettings>
                        <EditColumn UniqueName="EditCommandColumn1" ButtonType="ImageButton" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
                    </EditFormSettings>
                    <NoRecordsTemplate>
                        找不到資料！！
                    </NoRecordsTemplate>

                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Edit" Text="Edit" HeaderText="" UniqueName="Edit" />
                        <telerik:GridNumericColumn HeaderText="OrderID" FilterControlWidth="50px" UniqueName="OrderID"
                            DataField="OrderID" ReadOnly="True">
                        </telerik:GridNumericColumn>

                        <telerik:GridBoundColumn DataField="CustomerID" FilterControlWidth="50px" HeaderText="CustomerID" SortExpression="CustomerID" UniqueName="CustomerID"
                            CurrentFilterFunction="Contains" FilterControlAltText="Filter CustomerID column">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text=""></ModelErrorMessage>
                            </ColumnValidationSettings>
                            <HeaderStyle HorizontalAlign="Center" Width="70px"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" />
                        </telerik:GridBoundColumn>
                        <telerik:GridNumericColumn DataField="EmployeeID" FilterControlWidth="40 px" ShowFilterIcon="True" FilterControlAltText="Filter EmployeeID column" HeaderText="EmployeeID" SortExpression="EmployeeID" UniqueName="EmployeeID">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text=""></ModelErrorMessage>
                            </ColumnValidationSettings>
                        </telerik:GridNumericColumn>
                        <telerik:GridDateTimeColumn DataField="OrderDate" FilterControlWidth="100 px" ShowSortIcon="True" ShowFilterIcon="True" DataFormatString="{0:yyyy/MM/dd}" FilterControlAltText="Filter OrderDate column" HeaderText="OrderDate" SortExpression="OrderDate" UniqueName="OrderDate">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text=""></ModelErrorMessage>
                            </ColumnValidationSettings>
                        </telerik:GridDateTimeColumn>
                        <telerik:GridDateTimeColumn DataField="RequiredDate" HeaderText="RequiredDate" SortExpression="RequiredDate" UniqueName="RequiredDate"
                            CurrentFilterFunction="EqualTo"
                            HtmlEncode="false"
                            PickerType="DatePicker"
                            DataType="System.DateTime"
                            FilterControlWidth="100 px"
                            DataFormatString="{0:yyyy/MM/dd}"
                            FilterControlAltText="Filter RequiredDate column">
                            <ItemStyle Width="70px" />
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text=""></ModelErrorMessage>
                            </ColumnValidationSettings>
                        </telerik:GridDateTimeColumn>
                        <telerik:GridDateTimeColumn DataField="ShippedDate" FilterControlWidth="100 px" DataFormatString="{0:yyyy/MM/dd}" FilterControlAltText="Filter LastName column" HeaderText="ShippedDate" SortExpression="ShippedDate" UniqueName="ShippedDate">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text=""></ModelErrorMessage>
                            </ColumnValidationSettings>
                        </telerik:GridDateTimeColumn>
                        <telerik:GridNumericColumn DataField="ShipVia" FilterControlWidth="40 px" FilterControlAltText="Filter ShipVia column" HeaderText="ShipVia" SortExpression="ShipVia" UniqueName="ShipVia">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text=""></ModelErrorMessage>
                            </ColumnValidationSettings>
                        </telerik:GridNumericColumn>
                        <telerik:GridNumericColumn DataField="Freight" FilterControlWidth="50 px" FilterControlAltText="Filter Freight column" HeaderText="Freight" SortExpression="Freight" UniqueName="Freight">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text=""></ModelErrorMessage>
                            </ColumnValidationSettings>
                        </telerik:GridNumericColumn>
                        <telerik:GridBoundColumn DataField="ShipName" FilterControlAltText="Filter ShipName column" HeaderText="ShipName" SortExpression="AdditionalContactInfo" UniqueName="ShipName">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text=""></ModelErrorMessage>
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ShipAddress" FilterControlAltText="Filter ShipAddress column" HeaderText="ShipAddress" SortExpression="ShipAddress" UniqueName="ShipAddress">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text=""></ModelErrorMessage>
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ShipCity" FilterControlAltText="Filter ShipCity column" HeaderText="ShipCity" SortExpression="ShipCity" UniqueName="ShipCity">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text=""></ModelErrorMessage>
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ShipRegion" FilterControlAltText="Filter ShipRegion column" HeaderText="ShipRegion" SortExpression="ShipRegion" UniqueName="ShipRegion">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text=""></ModelErrorMessage>
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ShipCountry" FilterControlAltText="Filter ShipCountry column" HeaderText="ShipCountry" SortExpression="ShipCountry" UniqueName="ShipCountry">
                            <ColumnValidationSettings>
                                <ModelErrorMessage Text=""></ModelErrorMessage>
                            </ColumnValidationSettings>
                        </telerik:GridBoundColumn>

                        <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Delete" HeaderText="" UniqueName="Delete" />
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
        </div>
    </form>
</body>
</html>